/*fun predicateOfLength(length: Int): (String) -> Boolean {
    return { input: String -> input.length == length }
}*/
fun predicateOfLength(length: Int) = { input: String -> input.length == length }


val names = listOf<String>("parl", "tom", "Jerry")

print(names.find(predicateOfLength(5)))